<template>
  <div class="essay" v-for="item in data.essaylist" :key="item">
    <div class="tabtop">
      <img class="img" :src="item.essaypic" alt="" />
      <div class="titles">
        <p class="title">
          {{ item.title }}
        </p>
        <p class="desc">
          {{ item.desc }}
        </p>
      </div>
    </div>
    <div class="tabbot">
      <div class="tabbotl">
        <img :src="item.headpic" alt="" />
        <span>{{ item.user }}</span>
      </div>
      <div class="tabbotr">
        <button>
          <van-icon class="icon" name="good-job-o" />
          <span>155</span>
        </button>
        <button>
          <van-icon class="icon" name="smile-comment-o" />
          <span>155</span>
        </button>
      </div>
    </div>
  </div>
</template>

<script>
import { reactive } from "vue";
export default {
  setup() {
    const data = reactive({
      essaylist: [
        {
          essaypic: "http://121.40.124.132:3000/images/search/wenzhang.png",
          title: "抄作业 | 以视黄醇为主的routine参考",
          desc: "一套高效、全面的护肤方案",
          headpic: "http://121.40.124.132:3000/images/search/touxiang.png",
          user: "晨安睡不醒",
        },
        {
          essaypic: "http://121.40.124.132:3000/images/search/wenzhang.png",
          title: "抄作业 | 以视黄醇为主的routine参考",
          desc: "一套高效、全面的护肤方案",
          headpic: "http://121.40.124.132:3000/images/search/touxiang.png",
          user: "晨安睡不醒",
        },
        {
          essaypic: "http://121.40.124.132:3000/images/search/wenzhang.png",
          title: "抄作业 | 以视黄醇为主的routine参考",
          desc: "一套高效、全面的护肤方案",
          headpic: "http://121.40.124.132:3000/images/search/touxiang.png",
          user: "晨安睡不醒",
        },
        {
          essaypic: "http://121.40.124.132:3000/images/search/wenzhang.png",
          title: "抄作业 | 以视黄醇为主的routine参考",
          desc: "一套高效、全面的护肤方案",
          headpic: "http://121.40.124.132:3000/images/search/touxiang.png",
          user: "晨安睡不醒",
        },
        {
          essaypic: "http://121.40.124.132:3000/images/search/wenzhang.png",
          title: "抄作业 | 以视黄醇为主的routine参考",
          desc: "一套高效、全面的护肤方案",
          headpic: "http://121.40.124.132:3000/images/search/touxiang.png",
          user: "晨安睡不醒",
        },
        {
          essaypic: "http://121.40.124.132:3000/images/search/wenzhang.png",
          title: "抄作业 | 以视黄醇为主的routine参考",
          desc: "一套高效、全面的护肤方案",
          headpic: "http://121.40.124.132:3000/images/search/touxiang.png",
          user: "晨安睡不醒",
        },
        {
          essaypic: "http://121.40.124.132:3000/images/search/wenzhang.png",
          title: "抄作业 | 以视黄醇为主的routine参考",
          desc: "一套高效、全面的护肤方案",
          headpic: "http://121.40.124.132:3000/images/search/touxiang.png",
          user: "晨安睡不醒",
        },
        {
          essaypic: "http://121.40.124.132:3000/images/search/wenzhang.png",
          title: "抄作业 | 以视黄醇为主的routine参考",
          desc: "一套高效、全面的护肤方案",
          headpic: "http://121.40.124.132:3000/images/search/touxiang.png",
          user: "晨安睡不醒",
        },
      ],
    });
    return {
      data,
    };
  },
};
</script>

<style lang="less" scoped>
.essay {
  border-bottom: 1px solid #eee;
  .tabtop {
    padding: 12.5px 16px 0;
    margin-bottom: 5px;
    overflow: hidden;
    .img {
      float: left;
      width: 83px;
      height: 54px;
      margin-right: 13px;
    }
    .titles {
      width: 246px;
      float: left;
      .title {
        font-size: 14px;
        font-weight: 600;
        line-height: 20px;
        color: #535353;
      }
      .desc {
        font-size: 12px;
        line-height: 20px;
        color: #8b8b8b;
      }
    }
  }
  .tabbot {
    padding: 5px 16px 10px;
    .tabbotl {
      display: inline-block;
      height: 20px;
      img {
        width: 15px;
        height: 15px;
        float: left;
      }
      span {
        line-height: 15px;
        font-size: 12px;
        font-weight: 900;
        color: #6d6d6d;
        vertical-align: top;
      }
    }
    .tabbotr {
      float: right;
      height: 20px;
      .icon {
        font-size: 14px;
        float: left;
        color: #b9b9b9;
      }
      span {
        font-size: 1px;
        float: left;
        margin-left: 5px;
        color: #b9b9b9;
      }
      button {
        margin: 0 10px;
        border: none;
        background: #fff;
      }
    }
  }
}
</style>
